<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>构造函数</title>
	</head>

	<body>
		<script>
			function Flower(name, genera, area, uses) {
				this.name = name;
				this.genera = genera;
				this.area = area;
				this.uses = uses;
				this.showName = function() {
					alert(this.name);
				}

			}
			var flowers1 = new Flower("长春花", "夹竹桃", "非洲", "观赏");
			flowers1.showName();

			var flowers2 = new Flower("长春花", "夹竹桃", "非洲", "观赏");

			flowers2.showName();

			alert(flowers1 instanceof Flower);
			alert(flowers1 instanceof Object);
		</script>
	</body>

</html>